package com.yunfei.api.v2.service;
import com.yunfei.bo.result.ResultModel;
import com.yunfei.mapper.crm.MandatorIdMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
* @Description:获取管理人ID
* @Author: zhengyunfei
* @Date: 2019/8/9
* @time:10:48
*/
@Service
public class MandatorIdService {
    @Autowired
    private Environment env;
    @Autowired
    private MandatorIdMapper mandatorIdMapper;
    /**
    * @Description: 根据营销项目编号查询管理人ID
     * @param  projId 营销项目编号
    * @Author: zhengyunfei
    * @Date: 2019/8/15
    * @time:16:26
    */
    public String getMandatorId(String projId){
        ResultModel resultModel=new ResultModel();
        String result="";//管理人id
        try{
            Map<String,Object> queryMap=new HashMap<>();
            queryMap.put("projId",projId);
            result= mandatorIdMapper.getId(queryMap);
        }catch (Exception e){
            e.printStackTrace();
        }
        return result;
    }

}
